<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>新美DSP系统</title>
		<meta name="renderer" content="webkit">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
		<link rel="stylesheet" href="/static/backend/plugins/layui/css/layui.css">
		<link rel="stylesheet" href="/static/backend/css/passport.css">
		<script src="/static/backend/js/jquery/2.0.1/jquery.min.js"></script>
		<script src="/static/backend/plugins/layui/layui.js"></script>
	</head>
	<body>
		<div class="main-page">
			<div class="passport-model">
				<div class="passport-content">
					
					<div class="system-box">
						<h3>新美控股 | DSP媒体服务</h3>
					</div>
					
					<form class="layui-form" onsubmit="return false">
							<div class="layui-form-item">
								<div class="layui-input-block">
									<input type="text" name="username" required="required" lay-verify="required" maxlength="18" placeholder="请输入用户名" autocomplete="new-password" class="layui-input">
									</span>
								</div>
							</div>
							<div class="layui-form-item">
								<div class="layui-input-block">
									<input type="text" name="password" required="required" lay-verify="required" maxlength="18" placeholder="请输入密码" autocomplete="new-password" class="layui-input">
									</span>
								</div>
							</div>
							<div class="layui-form-item submit-box">
								<div class="layui-input-block">
									<button type="submit" class="layui-btn" lay-submit="" lay-filter="submit">登 录</button>
								</div>
							</div>
						</form>

				</div>
			</div>
		</div>
	</body>
	<script>
		// 加载FORM表单扩展
		layui.use(['form'], function(){
			var form = layui.form()
			,layer = layui.layer;
			form.on('submit(submit)', function(data){
				 $.ajax({
				  url: "doLogin",
				  type: "post",
				  data:data.field ,
				  dataType: "json",
				  success: function (response) {
					  if (response.status == "success") {
						window.location.href = response.jump;
					  } else {
						layer.msg(response.msg, {icon: 5, shift: 6}, function(){});
					  }
				  }
				});
			});
			
		});
	</script>
</html>